#pragma once

#include <memory>
#include <vector>

#include "Network.h"
#include "../Neuron/KMeansNeuron.h"
#include "../Math/KernelFunction/KernelFunctionBase.h"

using namespace std;

class CKmeansNetwork : public CNetworkBase
{
public:
	friend class CKMeansLearn;

public:
	CKmeansNetwork() = delete;

	CKmeansNetwork(int inputDimension, int K, double variance, double kernelRandomMin = -1.0, double kernelRandomMax = 1.0);

public:
	virtual bool Save(const char * szFileName = nullptr);

	virtual bool Load(const char * szFileName = nullptr);

	virtual Vector Execute(Vector InputData);

protected:
	int m_K;

	vector< shared_ptr<CKMeansNeuron> > m_KMeans;
};